package com.example.hetong_system.config;

import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import utils.VerifyCode;

@Configuration
public class ServletConfig {

    @Bean
    public ServletRegistrationBean<VerifyCode> verifyCodeServlet() {
        ServletRegistrationBean<VerifyCode> registrationBean =
                new ServletRegistrationBean<>(new VerifyCode(), "/code");
        registrationBean.setName("verifyCodeServlet");
        return registrationBean;
    }
}